<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023-06-10
  Time: 15:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/dan" method="post">
            姓名：<input type="text" name="user">
            <input type="submit" value="查询">
    <a href="/add">添加</a>
</form>
<table border="1">
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>电话</th>
            <th>所属部门</th>
        </tr>
        <c:forEach items="${list}" var="yg">
            <tr>
                <td>${yg.empID}</td>
                <td>${yg.empName}</td>
                <td>${yg.sex}</td>
                <td>${yg.age}</td>
                <td>${yg.tel}</td>
                <td>
                    <c:if test="${yg.deptID==1}">
                        开发部
                    </c:if>
                    <c:if test="${yg.deptID==2}">
                        运营部
                    </c:if>
                    <c:if test="${yg.deptID==3}">
                        维护部
                    </c:if>
                    <c:if test="${yg.deptID==4}">
                        测试部
                    </c:if>
                </td>
                <td>
                    <a href="/update"${yg.empID}name="id">修改</a>
                    <a href="/delete"${yg.empID}>删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
